<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function fun(){
            alert("无参函数调用");
        }
        fun();
        /**
         *参数不需要定义类型，需返回值直接返回不需要定义
         * */
        function fun2(a,b){
            alert("有参函数调用 a=>"+a+",b=>"+b);
        }
        fun2(12,"abc");

        function sum(a,b){
            var result=a+b;
            return result;
        }
        alert(sum(10,15));

    </script>
</head>
<body>

</body>
</html>